<extend name="Public:base"/>

<block name="main">
    <script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Admin/js/function.js"></script>


<div id="yzh-content" class="col-xs-12">

    <div class="main-title">
        <h2>后台角色管理</h2>
    </div>

    <form action="{:U('Role/sort')}" method="post" name="form">

        <div class="table-actions">
            <a class="btn btn-sm btn-primary" href="{:U('Role/add')}"> 新增</a>
            <input type="submit" value="排序" class="btn btn-sm btn-primary" />
        </div>

        <table class="table">
            <thead>
                <tr class="list_head ct">
                    <th width="70">排序权重</th>
                    <th width="70">ID</th>
                    <th width="350">角色名称</th>
                    <th >角色描述</th>
                    <th width="70">状态</th>
                    <th width="200">管理操作</th>
                </tr>
            </thead>
            <tbody>
            <volist name="list" id="vo">
                <tr class='<eq name="mod" value="1">tr<else/>ji</eq>'>
                    <td align='center'>
                        <input type='text' value='{$vo.sort}' size='3' name='sort[{$vo.id}]'></td>
                    <td align='center'>{$vo.id}</td>
                    <td >{$vo.name}</td>
                    <td >{$vo.remark}</td>
                    <td align='center'>
                        <eq name="vo.status" value="1"><font color="red">√</font><else/><font color="blue">×</font></eq>
                    </td>
                    <td align='center'>
                        <a href="javascript:setting_access({$vo.id}, '{$vo.name}')">权限设置</a>
                        | <a href="{:U('Role/edit/',array('id'=>$vo['id']))}">修改</a>
                        | <a href="javascript:void(0)" onclick="return confirmurl('{:U('/Admin/User/role_del/',array('id'=>$vo['id']))}','确定删除该角色吗?')">删除</a>
                    </td>
                </tr>
            </volist>
            </tbody>

        </table>
    </form>
</div>
<script type="text/javascript">
//权限设置
function setting_access(id, name) {
    window.top.art.dialog.open('{:U('Role/access')}'+'&roleid='+id,{
        title: name+'权限设置',
        width: 600,
        height: 500});
}
</script>
</block>